Composed UI
===========

A Nokia example application combining three different user interface 
implementations for presenting list based data: split view, list view, and 
grid view. The split view and the grid view utilise a custom grid layout. The 
list items in the split view are also custom items. All the views in the 
application are Form based. This example also demonstrates how to manage 
persistent data, including storing and restoring the application state.

The application is hosted in Nokia Developer Projects:
- https://projects.developer.nokia.com/composed_ui

For more information on the implementation, visit the wiki page:
- https://projects.developer.nokia.com/composed_ui/wiki


1. Prerequisites
-------------------------------------------------------------------------------

- Java ME basics


2. Project structure and implementation
-------------------------------------------------------------------------------

The root package, com.nokia.example.composedui, contains the main classes which
manage the application. In addition to Main MIDlet class, the root package
contains the interface for managing views and TabManager. The TabManager is a
container for the three main views in the application: split view, list view,
and grid view.

The model package holds the application data implementation, and has no relation
to the user interface (UI) at all. The traditional separation of UI and
application logic is applied to the design of Composed UI app. The classes in
model package are DataItem, ItemStorage, and interfaces for listening changes of
the instances of these classes. ItemStorage is a container for holding
individual DataItems. A single list or grid item in the UI is visual
presentation of a single DataItem.

The utils package provides tools for the model for managing the record store
(AppDataStorage, RecordStoreHelper) and for the UI for managing images
(ImageUtils). The PersistableState interface is implemented by the views so that
their state can be preserved in a generic way.

The views package contains all the views in the application. The three main
ones are split view, list view, and grid view. The other views are item view
which displays the data of a single item; item edit view for editing the item 
data; and item delete view for deleting multiple items at once.

The views.elements package contains the following custom components: GridLayout, 
GridItem, and IconListItem.


2.1 Used APIs
-------------

- com.nokia.mid.ui.CategoryBar
- com.nokia.mid.ui.DirectUtils
- com.nokia.mid.ui.ElementListener
- com.nokia.mid.ui.IconCommand
- com.nokia.mid.ui.LCDUIUtil
- com.nokia.mid.ui.orientation.Orientation

- java.io.InputStream
- java.lang.ref.WeakReference

- javax.microedition.io.Connector;
- javax.microedition.io.file.FileConnection
- javax.microedition.lcdui.CustomItem
- javax.microedition.rms.RecordEnumeration
- javax.microedition.rms.RecordStore


3. Compatibility
-------------------------------------------------------------------------------

Nokia Asha software platform 1.0. Tested on Nokia Asha 501. Developed with Nokia
Asha SDK 1.0.


3.1 Known Issues
----------------

None.


4. Building, installing, and running the application
-------------------------------------------------------------------------------

4.1 Preparations
----------------

Make sure you have the following installed:
 - Nokia Asha SDK 1.0.

4.2 Opening the project in Nokia Asha SDK
-----------------------------------------

The example has been created with Nokia Asha SDK 1.0. To open the projet in the
SDK, select File -> New -> MIDlet Project. Insert the project name, e.g.
"ComposedUI". Then select "Create project" from existing source and browse to 
the folder you have the project in. Click Finish.

4.3 Deploying and running the application
-----------------------------------------

You can install the application on a phone by transferring the JAR or JAD file 
in Mass storage mode or over Bluetooth. Nokia Suite can be used with Series 40
phones. For further information, see 
http://www.developer.nokia.com/Resources/Library/Java/#!introduction-to-java-me/deployment-options.html

Locate the file with file browser and tap to install. Then find the application
icon in the application menu and tap it to launch.


5. License
-------------------------------------------------------------------------------

See the license text file delivered with this project. The license file is also
available online at
https://projects.developer.nokia.com/composed_ui/browser/composed_ui/Licence.txt


6. Version history
-------------------------------------------------------------------------------

1.1 Image file management refactored including some bug fixes
1.0 The first release
